package tree.递归.剑指;

import po.TreeNode;

/**
 * @author songZiHao
 * @version 1.0.0
 * @ClassName 剑指Offer二叉树的镜像27.java
 * @Description TODO https://leetcode-cn.com/problems/er-cha-shu-de-jing-xiang-lcof/
 * @createTime 2021年03月28日 10:11:00
 */
public class 剑指Offer二叉树的镜像27 {
    public TreeNode mirrorTree(TreeNode root) {
        if (root==null){
            return null;
        }
        TreeNode temp=null;
        temp=root.left;
        root.left=mirrorTree(root.right);
        root.right=mirrorTree(temp);
        return root;
    }
}
